Frequency-adaptive notch filter

ABSTRACT

One apparatus includes a notch filter that has a state observer unit and a parameter adaptation unit. The state observer unit is configured to receive a sampled noisy electrical signal and a sampled filtered electrical signal, the state observer unit having an estimated noise signal output, the estimated noise signal output carrying an estimated noise signal to be subtracted from the sampled noisy electrical signal, resulting in the filtered electrical signal. The parameter adaptation unit is configured to receive the estimated noise signal and an error signal from the state observer unit. The parameter adaptation unit is also configured to determine, based on the estimated noise signal and the error signal, an updated estimated noise frequency, thereby causing the state observer unit to generate an updated estimated noise signal to be provided on the estimated noise signal output.

BACKGROUND

Sinusoidal noise exists in many systems. For instance, the input signalsfor medical devices, such as an electrocardiograph (ECG), are ofteninterfered with by electrical power supply line networks. For anotherinstance, the read/write head in a disk drive deviates from the desiredtracking trajectory due to disk eccentricity. This interference, ordeviation, is generally caused by sinusoidal noise.

In each of these types of systems, it is desirable to eliminate suchspurious signals, and isolate the desired signal, so that the output ofa circuit which processes the signal is a true representation of theinput signal without noise. In general, there are two methods to removesinusoidal noise in a system. One method is to insert a notch filter atthe noise frequency in series into the signal flow path. Another methodis to detect the sinusoidal noise, and then to subtract it from thecontaminated signal.

Both the serial notch filter and the signal subtraction methods ofremoving sinusoidal noise have drawbacks. For example, one problem withusing a serial notch filter is that with the elimination of noise at thenotch frequency, the frequency component of the desired signal at thenotch frequency is eliminated as well. This is particularly unacceptablein ECG, where any clinical information of the patient, including signalsat the filtered frequency, should be examined as the base for diagnosticand treatment. In addition, using serial notch filters in ECGapplications can cause ringing in the ECG waveform, which can result inan incorrect interpretation and/or analysis of the ECG signal.

In the noise subtraction method, there are generally three approaches inimplementation: Adaptive Noise Cancelling (ANC), Adaptive FeedforwardCancellation (AFC) and Internal Mode. Adaptive Noise Cancelling, inwhich the noise is considered uncorrelated with the input signal butcorrelated with a known reference signal, generally averages the signalover some amount of time to cancel the noise. This ANC approach reliesupon an additional reference signal that may or may not be known, andalso relies on an averaging approach in the concept of least-square.However, averaging signal over time is considered to risk change of somesignal characteristic, e. g. removal or distortion of nonrepetitivesignals, which may bear clinically relevant physiological dynamicinformation of the original ECG signal.

In Adaptive Feedforward Cancellation, noise is canceled by a signalexpressed as a linear combination of sine and cosine regressors and twounknown parameters, in which the amplitude and phase of the sinusoidalnoise are embedded. With this linear feature, an adaptive rule isdesigned to update the unknown parameters, thereby causing the output ofthe signal to converge to the noise in amplitude and phase. Theregressors that have the noise frequency information embedded areusually implemented by look-up tables. Using this AFC approach, however,different look-up tables are needed for noises with differentfrequencies. For example, to estimate the higher harmonic noises, twoadditional look-up tables are needed for every harmonic, therebyrendering such implementations complex and expensive.

The Internal Mode approach uses trigonometric features to generate asinusoidal signal that holds the information of amplitude and phase inthe mode itself. The frequency information expressed in a parameter inthe internal mode is generally required to be known and preset. Becausethe frequency is preset, it is claimed that this internal model isequivalent to a standard notch filter and does not provide for parameteradaptation. From the functional point of view, all above describedapproaches can be seen as notch filters in the sense that they attemptto remove the noise signal at the notch frequency.

Apart from the various problems with the methods described above, acommon precondition to employing any of the above-described methods isthat the frequency of the noise signal to be detected and removed isboth constant and known. However, this requirement of prior knowledgefor the noise frequency cannot always be met. In some cases, the noisefrequency may change, and may be unknown to the user. For example, inthe case of power line interference observed on ECG signals, forinstance, there are different power line frequencies in differentregions. For example, 60 Hz is used in North America, whereas 50 Hz inEurope and China. Because ECG users cannot be assumed to know the powerline frequencies present in a particular region, and because the sameECG machine might be used or sold in different regions, ECGmanufacturers are generally required to create systems that are capableof being used in any region.

One particular example of the output of an ECG machine is illustrated inFIG. 1. That figure illustrates an ECG report 10 for an ECG signal takenusing a portable ECG CP50 machine manufactured by Welch Allyn, Inc. ofSkaneateles Falls, N.Y. That device uses the internal mode approach,similar to that discussed above, in which a sinusoidal noise at a presetfrequency (60 Hz in this example) signal can be filtered. In thisexample, the ECG is used in a country having a 50 Hz power supply. Asillustrated, the ECG report shows power line noises (illustrated best inthe magnified portion 12 of the report 10) that are not eliminatedbecause of the difference between the preset frequency to the internalmode and the local power line frequency. As discussed above, theinternal mode, as well as the various other approaches for removingperiodic noise, are not well adapted to this scenario, in whichdiffering power signal frequencies may be encountered.

In addition to the problem of power signals having different intendedfrequencies, it is also possible for some variance in a power linefrequency to occur. For example, Standard EN50160 specifies a maximumpower network frequency variations in countries forming the EuropeanUnion (EU) as ±1% for 95% of a week, and +4%, −6% for a full week. Thismeans that networks in EU might have a frequency variation of about 4%high, or 6% low, for periods of up to 5% of a week, that is, 8.5 hours.Moreover, there are some parts of the world where the electrical powersupply is even worse, resulting in larger frequency variations thanthose specified in existing regional standards.

For these and other reasons, improvements in existing ECG machines andnoise filters are desired.

SUMMARY

In accordance with the following disclosure, the above and other issuesare generally addressed by the following.

In a first aspect, a notch filter has a state observer unit and aparameter adaptation unit. The state observer unit is configured toreceive a sampled noisy electrical signal and a sampled filteredelectrical signal, the state observer unit having an estimated noisesignal output, the estimated noise signal output carrying an estimatednoise signal to be subtracted from the sampled noisy electrical signal,resulting in the filtered electrical signal. The parameter adaptationunit is configured to receive the estimated noise signal and an errorsignal from the state observer unit. The parameter adaptation unit isalso configured to determine, based on the estimated noise signal andthe error signal, an updated estimated noise frequency, thereby causingthe state observer unit to generate an updated estimated noise signal tobe provided on the estimated noise signal output.

In a second aspect, a method of stably adaptively detecting sinusoidalnoise from an electrical signal is disclosed. The method includesreceiving a noisy electrical signal having a periodic noise componentwith an unknown and time-varying frequency and a filtered electricalsignal component. The method also includes performing a frequencyidentification process on the sampled noisy electrical signal todetermine a baseline frequency on which frequency variations occur foran estimated periodic noise signal, the frequency identification processselecting from among a plurality of discrete, predetermined frequencies.The method further includes performing a frequency adaptation process onthe sampled noisy electrical signal, the frequency adaptation processresulting in an updated estimated periodic noise signal to be subtractedfrom the sampled noisy electrical signal, thereby forming a filteredelectrical signal.

In a third aspect, an ECG machine is disclosed. The ECG machine includesa controller, one or more ECG sensor inputs communicatively connected tothe controller, and a power signal electrically connected to thecontroller. The ECG machine also includes a memory configured to storecomputer-executable instructions which, when executed using thecontroller, are configured to perform a method. The method includesreceiving a noisy electrical signal at the controller from the one ormore ECG sensor inputs, the noisy electrical signal having a periodicnoise component occurring at least in part due to the power line networkinterference and a filtered electrical signal component. The methodfurther includes performing a frequency identification process on thesampled noisy electrical signal to determine a baseline frequency onwhich frequency variations occur for an estimated periodic noise signal,the frequency identification process selecting from among a plurality ofdiscrete, predetermined frequencies. The method also includes performinga frequency adaptation process on the sampled noisy electrical signal,the frequency adaptation process resulting in an updated estimatedperiodic noise signal to be subtracted from the sampled noisy electricalsignal, thereby forming a filtered electrical signal.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example ECG chart in which power line interference at afrequency of 50 Hz in an ECG signal is not eliminated by a notch filterset at an incorrect frequency of 60 Hz.

FIG. 2 shows an example block diagram of an ECG machine in which aspectsof the present disclosure can be implemented.

FIG. 3 shows an example block diagram of a system including a stateobserver useable to remove sinusoidal noise of a known frequency from asignal, which can be used to implement example aspects of the presentdisclosure.

FIG. 4 shows an example block diagram of a system including a frequencyadaptive state observer removing sinusoidal noise with an unknown andtime-varying frequency, according to an example embodiment.

FIG. 5 shows an example block diagram of the equivalent adaptive notchfilter of the adaptive state observer, according to an exampleembodiment.

FIG. 6 shows an example block diagram of an upper-level structure of afrequency-adaptive notch filter, according to an example embodiment.

FIG. 7 depicts detailed structures of the state observer unit and theparameter adaptation unit of FIG. 6, according to an example embodiment.

FIG. 8 depicts a detailed structure of the robustness enhancer unit ofFIG. 6, according to an example embodiment.

FIG. 9 shows a plurality of switch functions incorporated into therobustness enhancer unit, according to an example embodiment.

FIGS. 10-11 show flowcharts of a method by which adaptive notchfiltration can be performed, according to an example embodiment.

FIGS. 12a-c illustrate waveforms in simulation representing frequencyidentification using an example of the adaptive systems discussedherein, using a power line frequency of 50 Hz.

FIGS. 13a-c illustrate waveforms in simulation representing frequencyidentification using an example of the adaptive systems discussedherein, using a power line frequency of 60 Hz.

FIGS. 14a-c illustrate waveforms in simulation demonstrating theeffectiveness of the frequency identification and frequency adaptationusing an example of the adaptive systems discussed herein, by simulatingfrequency adaptation to 45 Hz (50−10% Hz).

FIGS. 15a-c illustrate waveforms in simulation demonstrating theeffectiveness of the frequency identification and frequency adaptationusing an example of the adaptive systems discussed herein, by simulatingfrequency adaptation to 52 Hz (50+4% Hz).

FIGS. 16a-c illustrate waveforms in simulation demonstrating theeffectiveness of the frequency identification and frequency adaptationusing an example of the adaptive systems discussed herein, by simulationfrequency adaptation to 58 Hz (60−3.3% Hz).

FIGS. 17a-c illustrate waveforms in simulation demonstrating theeffectiveness of the frequency identification and frequency adaptationusing an example of the adaptive systems discussed herein, by simulationfrequency adaptation to 65 Hz (60+8.3% Hz).

FIGS. 18a-c illustrate waveforms in simulation demonstrating theeffectiveness of the frequency identification and frequency adaptationusing an example of the adaptive systems discussed herein, by simulationin which frequency changes from 50 Hz to 45 Hz.

DETAILED DESCRIPTION

As briefly described above, embodiments of the present disclosure aredirected to digital signal processing or filtering, and moreparticularly, to filters for removing noise components of a signal(e.g., a sinusoidal signal). Still more particularly, embodimentsdiscussed herein provide for a method and apparatus for removingsinusoidal noise with unknown and time-varying frequency, such as viause of a frequency-adaptive notch filter.

In accordance with the apparatus and methods described herein it isnoted that, using the adaptive notch-filtering described herein it ispossible to eliminate sinusoidal noise, in particular, to remove theinterference in ECG measurement due to power line network interference.This can be performed by automatically identifying the frequency of thepower line network that interferes with the ECG measurement, therebyallowing for use of a common device within devices under power linenetworks with different frequencies, and despite variation in frequencyof the power line network, without interference that would otherwisearise due to its occurrence outside of a notch filter's frequency band.

In addition to the flexibility for use with different constant-frequencypower signals, the adaptive apparatus disclosed herein is configured toadaptively track variation of the power line frequency to remove theinterference. In certain embodiments, an apparatus constructed accordingto the principles discussed herein can adapt to differing power linefrequencies without requiring user knowledge of the power line frequencyor input into the device, and is constructed to automatically remove thepower line interference as the filter is being turned on.

Referring now to FIG. 2, an example block diagram of an ECG machine 100is shown, in which aspects of the present disclosure can be implemented.The ECG machine 100 is generally configured to obtain a signaturerepresenting electrical activity of a heart over a period of time.Generally, an ECG machine is configured to detect very low levelelectrical signals in a human body over time, based on the use ofelectrodes attached to a user's skin. The ECG machine can generally takeany of a number of forms; example ECG machines could be a CP50,CP100/200 or CP150/250 machine manufactured by Welch Allyn, Inc. ofSkaneateles Falls, N.Y., as adapted to incorporate the adaptivesinusoidal interference cancellation features described herein.

In the embodiment shown, the ECG machine 100 includes a controller 102communicatively connected to a memory 104. The controller 102 isgenerally configured as a physical device including one or moreintegrated circuit configured to execute software instructions. Invarious embodiments, the controller 102 can include one or more generalpurpose processing units, or can alternatively be implemented as anapplication-specific integrated circuit (ASIC). The memory 104 can takeany of a number of forms, and can include volatile and/or non-volatilememory units, forming computer-readable media from which the controller102 can access data and/or instructions for execution.

In the embodiment shown, the ECG machine 100 further includes inputs,including ECG sensor inputs 106 and other sensor inputs 108. The ECGsensor inputs 106 can be connected, for example, to electrodesconfigured to be placed on a human, such that the electrodes can detectand communicate electrical signals to the controller 102 for processing.In example embodiments, the ECG sensor inputs 106 and other sensorinputs 108 can be connected to general purpose or specialized I/Oconnections of the controller 102.

In the embodiment shown, the ECG machine 100 includes a power supply110, configured to provide power to the controller 102 and othercomponents of the ECG machine 100. In various embodiments, the powersupply 110 can be configured for connection to an external power signal,such as a 50 Hz or 60 Hz signal, and can also be configured to charge orprovide power from a battery unit (integrated therewith) for poweringthe ECG machine 100 if it is to be used in circumstances where a powersignal is unavailable.

In the embodiment shown, the ECG machine 100 also includes a datainterface 112, which can be any of a variety of I/O interfaces, such asa Universal Serial Bus (USB) or serial data connection, and can beconfigured for exchange of data between the ECG machine 100 and anexternal system. In addition, as illustrated the ECG machine 100includes a display panel 114 and one or more input devices 116 for userinteraction with the machine, for example to provide commands to themachine directing particular display or test functionality. In someembodiments, the display panel 114 can be any of a variety of types ofLCD, LED, plasma, printer, plotter or other types of displays, and isconfigured to display one or more ECG graphs, such as that illustratedin FIG. 1.

In accordance with the present disclosure, it is noted that, due to thesensitive electrical signals received at the ECG sensor inputs 106 atthe controller 102, it is not uncommon to have some type of electricalcrosstalk or interference, due in part to power line noise incurredbased on the interaction of an ECG machine, patient body, and theinterconnection between the two. For example, an ECG measurement from anECG machine powered by battery experiences interference due to a powerline signal received at the ECG machine. In such cases, and as notedabove, it is common to filter or otherwise compensate for that ECGsignal, when the signal is with a noise of a known magnitude/frequency.In accordance with the following disclosure, the ECG machine 100 caninclude, either within the controller 102 or the memory 104,instructions or circuitry configured to compensate for suchinterference, for example by adaptively detecting a frequency of theinterfering signal, and applying a compensation or filtering arrangementat that frequency.

In accordance with the ECG machine 100 described above, and also asdiscussed throughout the present disclosure, the term computer readablemedia as used herein may include computer storage media andcommunication media.

As used in this document, a computer storage medium is a device orarticle of manufacture that stores data and/or computer-executableinstructions. Computer storage media may include volatile andnonvolatile, removable and non-removable devices or articles ofmanufacture implemented in any method or technology for storage ofinformation, such as computer readable instructions, data structures,program modules, or other data. By way of example, and not limitation,computer storage media may include dynamic random access memory (DRAM),double data rate synchronous dynamic random access memory (DDR SDRAM),reduced latency DRAM, DDR2 SDRAM, DDR3 SDRAM, DDR4 SDRAM, solid statememory, read-only memory (ROM), electrically-erasable programmable ROM,optical discs (e.g., CD-ROMs, DVDs, etc.), magnetic disks (e.g., harddisks, floppy disks, etc.), magnetic tapes, and other types of devicesand/or articles of manufacture that store data. Computer storage mediagenerally excludes transitory wired or wireless signals.

Communication media may be embodied by computer readable instructions,data structures, program modules, or other data in a modulated datasignal, such as a carrier wave or other transport mechanism, andincludes any information delivery media. The term “modulated datasignal” may describe a signal that has one or more characteristics setor changed in such a manner as to encode information in the signal. Byway of example, and not limitation, communication media may includewired media such as a wired network or direct-wired connection, andwireless media such as acoustic, radio frequency (RF), infrared, andother wireless media.

Referring now to FIG. 3, a system 200 comprising a state space model ofthe noisy interference as plant 202, in which the noise is modeled asone of the system state, and a state observer 210 to estimate the noiseuseable to remove sinusoidal noise of a known frequency from a signal isdisclosed, and upon which the adaptive state observer (and associatedadaptive notch filter) of the present disclosure are based. Generally,the state observer 210 can be implemented as part of an adaptiveobserver or adaptive filter arrangement in software and/or hardware ofan ECG machine, such as machine 100 described above, and can be used todetect a particular sinusoidal interference signal.

Overall, the system 200 is configured to deal with a signal and viewthat signal as an aggregate of an ECG signal and a sinusoidal noisesignal. In general, a sinusoidal signal m(t), which may have anamplitude A, angle frequency ω, and phase φ can be expressed as:m(t)=A sin(ωt+φ).

In a discrete domain, this signal can alternatively be represented bythe following equation, where m(k) is the k-th sample of m(t), N=2 cos(2πf/f_(s)), ω=2πf, and f_(s) is the sampling frequency:m(k)=Nm(k−1)−m(k−2)

It is noted that in this equation, the amplitude and phase do notexplicitly appear; but are instead embedded in this characteristiccalled internal mode. The only one parameter that needs to be set is ωor N, which is determined by the frequency. This feature is thereforeused to generate a sinusoidal signal.

In FIG. 3, the system 200 includes a plant 202 and an observer 210. Theplant 202 represents a system from which a noisy electrical signal canbe obtained; in general, the plant 202 generates the ECG signal asaffected by a power line interference signal or other periodic signal,resulting in noisy signal 220. In the context of FIG. 3, this noisysignal is represented by s(k), with the ECG signal and power lineinterference components are represented as c(k) and m(k), respectively:s(k)=c(k)+m(k)

It is noted that, over time, each sampled power line interference signalcan have a modeled as a function of the previous power line interferenceas follows, where w represents the relationship between the power linefrequency f_(n) and sampling frequency, f_(s), w=2 cos(2πf_(n)/f_(s)):m(k+1)=wm(k)−m(k−1).

Similarly, if the ECG signal c(k) has a very slowly changing dynamicsbased on the means described later such that it can be modeled as aconstant offset of c(k)=c(k−1), the output can be represented by thefollowing equation:y(k)=s(k)=s(k−1)=m(k)−m(k−1)+c(k)−c(k−1).

The plant 202 describing by the above equations can be reformulated as astate space model:x(k+1)=Ax(k),y(k)=Cx(k),

in which the system state is illustrated as x(k) and the following modelassumptions are present:

${{x(k)} = \begin{bmatrix}{m(k)} \\{m\left( {k - 1} \right)} \\{c(k)} \\{c\left( {k - 1} \right)}\end{bmatrix}},{A = \begin{bmatrix}w & {- 1} & 0 & 0 \\1 & 0 & 0 & 0 \\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1\end{bmatrix}},{C = \begin{bmatrix}1 & {- 1} & 1 & {- 1}\end{bmatrix}}$

The observer 210 is configured to receive a version of this noisy signal220, in the form of the y(k) signal. The observer 210 can be constructedin a variety of ways; in one example embodiment, the observer 210 can berepresented as an observed system state {circumflex over (x)}(k), anobserved output ŷ(k), and a measured error e(k):{circumflex over (x)}(k+1)=A{circumflex over (x)}(k)+Le(k),{circumflex over (y)}(k)=C{circumflex over (x)}(k),e(k)=y(k)−{circumflex over (y)}(k)

In this arrangement, {circumflex over (x)}(k)=[{circumflex over (m)}(k){circumflex over (m)}(k−1) ĉ(k) ĉ(k−1)]^(T) and L is the observer gain,L=[l 0 0 0]^(T). This observer 210 can alternatively be reflected as:{circumflex over (m)}(k+1)=w{circumflex over (m)}(k)−{circumflex over(m)}(k−1)+le(k)

Once the system state {circumflex over (x)}(k) is estimated by theobserver, an estimated noise 230 can be obtained from the following:{circumflex over (m)}(k)=C ₁ {circumflex over (x)}(k), C ₁=[1 0 0 0]

This estimated noise 230 is generally subtracted from the noised signal220, thereby resulting in a de-noised ECG signal 240:{circumflex over (c)}(k)=s(k)−{circumflex over (m)}(k)=C ₂ x(k)−C ₁{circumflex over (x)}(k), C ₂=[1 0 1 0].

Now referring to FIG. 4, an adaptive system 300 is illustrated, whichcan be used to isolate and remove sinusoidal noise with an unknown andtime-varying frequency, according to an example embodiment. In thisarrangement, a plant 310 is illustrated whose model further includes W,an unknown parameter vector representing the unknown and time-varyingfrequency, and the system state including the noise is observed by afrequency adaptive state observer 320. As compared to the arrangement ofFIG. 3, when a sinusoidal signal is unknown, the state observer 320 canbe used to estimate the noise signal that is taken as a system state byconsidering the de-noised ECG signal 240 (unaffected by a power linenetwork interference) as modeled as a constant. In particular, asillustrated in FIG. 4, the unknown parameter is estimated as beinglinear in the error mode, and therefore a linear adaptive observer canbe implemented, to ensure that both system state error and parameterestimation error generally converge to zero (i.e., over time, theestimation of the phase, frequency, and magnitude of the power signalcontribution converges to an accurate value).

In the embodiment shown, the plant 310 is modeled in state space asx(k+1)=A ₀ x(k)+WC ₁ x(k)=A ₀ x(k)+Wx ₁(k),y(k)=Cx(k),where A=A₀+WC₁, A₀ is known, W is unknown, x₁(k)=C₁x(k), and

${A_{0} = \begin{bmatrix}w_{0} & {- 1} & 0 & 0 \\1 & 0 & 0 & 0 \\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1\end{bmatrix}},{W = \begin{bmatrix}w \\0 \\0 \\0\end{bmatrix}},{C_{1} = {\begin{bmatrix}1 & 0 & 0 & 0\end{bmatrix}.}}$

The adaptive observer 320 can be constructed as follows:{circumflex over (x)}(k+1)=A ₀ {circumflex over(x)}(k)+Le(k)+{circumflex over (W)}(k){circumflex over (x)} ₁(k),y(k)=C{circumflex over (x)}(k),e(k)=y(k)−{circumflex over (y)}(k),{circumflex over (W)}(k+1)={circumflex over (W)}(k)+he(k){circumflexover (x)} ₁(k).

In the above, h>0 is a factor to control the parameter update speed andŴ(k) is the estimation of the unknown parameter W at the k-th sample, inother words: Ŵ(k)=[ŵ(k) 0 0 0]^(T), and {circumflex over(x)}₁(k)=C₁{circumflex over (x)}(k).

When the adaptive observer model 320 is expanded, the noise component ofa particular sample can be represented as follows:{circumflex over (m)}(k+1)=w ₀ {circumflex over (m)}(k)−{circumflex over(m)}(k−1)+le(k)+{circumflex over (w)}(k){circumflex over (m)}(k).

Similarly, the frequency of the noise as observed at a particular samplecan be tracked to vary over time, using the parameter update speed setabove, as follows:{circumflex over (w)}(k+1)={circumflex over (w)}(k)+he(k){circumflexover (m)}(k).

As compared to the state space observer 210 of FIG. 3, it is noted thatobserver 210 can be converted to an adaptive observer 320 by adding thelast term ŵ(k){circumflex over (m)}(k) in the equation representing thesampled noise {circumflex over (m)}(k+1) and adding the termhe(k){circumflex over (m)}(k) to reflect the change in frequency basedon the previous sampled noise, ŵ(k+1). In general, and in view of theabove, it can be proven that the adaptive observer 320 is stable in thesense that both the system error and the parameter adaptation errorconverge to zero over time.

Referring now to FIG. 5, a block diagram of an adaptive notch filter 400is shown, implementing the adaptive state observer of FIG. 4 accordingto an example embodiment. In other words, a transfer function N(z) canbe expressed as:

${N(z)} = {\frac{\hat{c}(z)}{s(z)} = \frac{1}{1 - {H(z)}}}$

In this equation, transfer function H(z), illustrated as transferfunction 410 of FIG. 5, can be expressed as:

${H(z)} = {\frac{\hat{m}(z)}{s(z)} = \frac{{lz}^{- 1} - {lz}^{- 2}}{1 - {\left( {w_{0} + \hat{w} - l} \right)z^{- 1}} + {\left( {1 - l} \right)z^{- 2}}}}$resulting in:

${N(z)} = {\frac{1}{1 - {H(z)}} = \frac{1 - {\left( {w_{0} + \hat{w} - l} \right)z^{- 1}} + {\left( {1 - l} \right)z^{- 2}}}{1 - {\left( {w_{0} + \hat{w}} \right)z^{- 1}} + z^{- 2}}}$This is, correspondingly, a notch filter whose notch frequency isrepresented by parameter w₀+ŵ. When the system is configured to beadaptable to update ŵ over time, the filter becomes an adaptive notchfilter, analogous to the construction illustrated in FIG. 4. Although itis functionally equivalent to a notch filter in the sense that thefrequency component at the notch frequency is -suppressed in magnitude,it is different from the serial notch filter approach in which both thenoise and the ECG signal at the notch frequency are decreased. Here onlythe noise signal is eliminated whereas the ECG signal is not affected.

FIG. 6 is a block diagram of a top-level structure of afrequency-adaptive notch filter 500, according to an example embodiment.Generally, the filter 500 includes a state observer unit 510, aparameter adaptation unit 520, and a robustness enhancer unit 530.Generally, a de-noised ECG signal 240 is detected, similarly to themanner described above in connection with FIGS. 3-5, by subtracting anestimated noise 230 from a noisy ECG signal 220. In the embodimentshown, the state observer unit 510 receives the de-noised ECG signal240, as well as an estimated noise frequency 540, output from theparameter adaptation unit 520. The state observer unit 510 generates anestimated noise signal 230 and an error 550, to be provided to theparameter adaptation unit 520. Additionally, the parameter adaptationunit 520 also receives an input 560 from the robustness enhancer unit530. The robustness enhancer unit 530 receives the noisy signal 220, aswell as the estimated frequency 540.

FIG. 7 depicts detailed structures of the state observer unit 510 andthe parameter adaptation unit 520, according to an example embodiment.In this example, the state observer unit 510 includes a sinusoidalinternal model 511 and an error generator 512. In example embodiments,the sinusoidal model 511 can be described as {circumflex over(m)}(k+1)=w₀{circumflex over (m)}(k)−{circumflex over(m)}(k−1)+ŵ(k){circumflex over (m)}(k)+f(k), while the error generator512 described by f(k)=d sgn(ĉ(k)−ĉ(k−1))=d sgn(y(k)−ŷ(k)) can beconsidered as the clamped output of the linear error with a very largeobserver gain l, i.e., f(k)=le(k)=l(y(k)−ŷ(k)), |e (k)|≦d/l, where d isthe error clamp. Furthermore, the parameter adaptation unit 520 can bedescribed according to the adaptive observer equation explained above,namely ŵ(k+1)=ŵ(k)+hf(k){circumflex over (m)}(k).

FIG. 8 depicts a detailed structure of the robustness enhancer unit 530of FIG. 6, according to an example embodiment. In the embodiment shown,the robustness enhancer unit 530 is generally constructed to enhance therobustness of the system adaptation, for example by controlling themanner by which system convergence to the unknown frequency takes place.

In an example embodiment of the robustness enhancer unit 530, a switchfunction method can be employed, in which a segment of the overallsignal is sought that has relatively slow dynamics for systemadaptation, and segments of the overall signal that have high dynamicsare ignored. In other words, the robustness enhancer unit 530 controls aswitching output that controls when the parameter adaptation unit 520 isactive, thereby ensuring that parameter update occurs during quietperiods of the low dynamic portion of the signal, and allows, in thecase of an ECG signal, parameter update to take place away from the ECGsignal spikes that are naturally occurring based on cardiac activity.This is the basis of modeling the ECG signal as a constant offset duringparameter update.

Although in general a variety of different approaches can be taken fordetecting a slow dynamics portion of a signal using the robustnessenhancer unit, in one example embodiment a max/min switching approach isused, that implements both a linear criterion unit 600 and a wide angleunit 610. In the embodiment shown, a linear criterion unit 600 can beused to look for a segment that has relatively low dynamics for systemadaptation, and stop the adaptation at an observed segment that has highdynamics, while the wide angle unit is configured to overlook theparameter adaptation on a wider perspective. Details of each unit areprovided below.

In an example embodiment, linear criterion unit 600 can be configured touse the noisy signal 220 as input and provide an output 604 thatrepresents a local magnitude within an expected noise signal timedifference. A switching unit 620 receives the output 604, and generatesa switching output 621 with a logic value of “0” (indicating to stopadaptation) or “1” (indicating to continue adaptation). Generally, thelinear criterion unit 600 includes one or more signal analysis functionswhich obtain an absolute value of signal magnitudes over a period oftime greater than the ratio of the sampling frequency over the minimumnoise frequency. In one such embodiment, these functions can bedescribed as:FD(k)=s(k+d _(n))−s(k), for k=1 . . . d _(n) , d _(n) ≧f _(s) /f _(min)CR=|FD _(max) −FD _(min)|

In this embodiment, the switching unit can selectively activate based onwhether the magnitude of CR exceeds a predetermined threshold M whichdetermines whether to stop parameter adaptation:

${{sws}(k)} = \left\{ \begin{matrix}{1,} & {{{if}\mspace{14mu}{CR}} < M} \\{0,} & {else}\end{matrix} \right.$

In an example embodiment, the wide angle unit 610 includes a decimationelement 612 and a low-pass filter 613. The decimation element 612resamples the input parameter estimation 440 in a lower samplingfrequency with decimation factor d_(m), and passes that resampled signalto the low-pass filter 613, which in turn removes high frequencysignals.

In the embodiment shown, a second switching unit 630 receives an outputsignal from the wide angle unit 610, and, in one case, for example, inthe frequency identification, outputs a binary value based on thefiltered signal according to the following function:

${{sww}(k)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu}{{wmf}(k)}} \geq {{wmf}_{1}\mspace{14mu}{or}\mspace{14mu}{{wmf}(k)}} \leq {wmf}_{2}} \\{1,} & {else}\end{matrix} \right.$

In considering the output of the second switching unit as a function ofa rate of change of wmf, this rate of change can be expressed as:dwmf(k)=wmf(k+1)−wmf(k),

Therefore, in another case, for example, in the frequency adaptation,the switch output of the second switching unit 630 can be expressed as afunction of whether a rate of change exceeds a particular threshold:

${{sww}(k)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu}{{{dwmf}(k)}}} \leq \delta} \\{1,} & {else}\end{matrix} \right.$

Based on the above, an overall output from the robustness enhancer unit530 is therefore a logical “AND” combination of switching units 620,630, as follows:hsw(k)=sws(k)·sww(k).

This modulates the parameter adaptation by the following rate:h=h·hsw(k).

FIG. 9 shows a chart 700 that depicts a plurality of switch functionsincorporated into the robustness enhancer unit, according to an exampleembodiment. In particular, the chart 700 illustrates switch functionsthat may occur to remove power line interference having a 50 Hzfrequency, with up to 10% variations below that frequency value. As seenin that figure, output of the first switching unit 620, sws(k),configured to represent a high logic signal at a time where the noisysignal s(k) is relatively constant; in addition, the output of thesecond switching unit 630, sww(k), is configured to represent a highlogic signal at a time where the rate of change of wmf is above aparticular threshold. As such, where both of these features areoccurring, the output of the robustness enhancer unit 530 enablesadaptation in the system resulting in a high logic signal on hsw(k).

Referring now to FIGS. 10-11, flowcharts illustrating an overall method800 for adaptation and filtration of a noisy signal, such as an ECGsignal as interfered with via power line network, are disclosed. Asillustrated in these figures, the system adaptation method generallyincludes two stages: a first frequency identification stage 810, and asecond frequency adaptation stage 820.

In the embodiment shown, due to the fact that two widely used power linefrequencies are 50 Hz and 60 Hz, the adaptation method 800 starts froman initial frequency parameter w₀ representing 55 Hz. the parameteradaptation will go towards two different directions for the two possiblefrequencies. With reference to FIG. 9, during time 0≦t≦t₂, the system isin the frequency identification stage 810. In particular, during thefrequency identification stage, parameters are initialized as shown inTable 1 based on the 55 Hz assumption (step 832):

TABLE 1 Used Parameters Symbol Parameter Value Unit f_(s) samplingfrequency 500 Hz f₀ initial frequency 55 Hz d error clamp 1 × 10⁻³ hparameter update speed factor in 5 frequency identification h₅₀parameter update speed factor in 5 frequency adaptation when baselinefrequency is 50 Hz h₆₀ parameter update speed factor in 8 frequencyadaptation when baseline frequency is 60 Hz d_(m) decimation factor inRE 50 d_(n) FD factor in RE 50 M CR threshold in RE 0.15 wmf₁ upperlimit of wmf (k) in RE 0.02 wmf₂ lower limit of wmf (k) in RE −0.02 δwmf (k) change rate threshold in RE 2 × 10⁻⁴ t₂ time 2 3 s t₃ time 3 4 st₄ time 4 5 s m₀ initial value of noise [0 0]^(T) w₀ initial value ofunknown parameter [0 0]^(T)

At this point, operation of the system is initiated (process flow point1), indicating that the ECG machine has begun operation. A stateobserver obtains estimations of signals m(k) and c(k) according to thegeneral process described above (step 834). A linear criterion sws(k) isthen determined at the robustness enhancer unit 530 (step 836), and,over a longer period of time, a wide angle logical output sww(k) isgenerated as well, thereby generating an overall logical output from therobustness enhancer unit 530 based on sws(k), sww(k), and thereforehsw(k), thereby dictating times at which adaptation should take place(step 838).

If time t₂ has not yet been reached (as determined in step 840), thesystem determines whether wmf exceeds a first threshold (step 842); ifso, this indicates that there is sufficient information to determinethat the parameter update has moved toward the 50 Hz direction, anassignment operation sets a parameter w₅₀ (step 844), representing a 50Hz signal is to be assigned. Alternately, a second assessment operationdetermines whether wmf is below a second predetermined wmf threshold,noted as wmf₂ (step 846), an assignment operation sets a parameter w₆₀(step 848), representing a 60 Hz signal is to be assigned. At thispoint, frequency identification has completed. The selection of t₂should ensure the frequency identification process to have sufficientlylong time to complete.

Referring back to step 840, if time t₂ is reached, a frequencyadaptation stage 820 is entered. In the frequency adaptation stage, theparameter update is restarted in the overall system to track frequencyvariation an assessment of whether t₃ has yet been reached is made (step850). If so, a new value for h, being a rate of adaptation, is set toeither h₅₀ or h₆₀ value according to w(k) is positive or negative forthe baseline frequency is 50 Hz or 60 Hz respectively, from the h forfrequency identification (step 852). At this point, execution point 3 isreached, which would also be reached upon assigning either of the w₅₀ orw₆₀ parameters.

If time t₄ is exceeded, the change rate of wmf(k) is assessed (step854). If it is less than or equal to a specific delta value (i.e.,|dwmf(k)|≦δ), the adaptation is therefore forced to stop to enhancesystem stable robustness, setting h to 0 (step 855). At this point, theparameter adaptation unit 520 receives all the inputs, and adapts theparameter representing the noise frequency based on the state observerunit 510 (step 856). A next sample is acquired (step 858), and anassessment operation (step 860) either returns the system to executionpoint 1, or terminates operation of the adaptive method.

Referring now to FIGS. 12-18 generally, various waveforms areillustrated that show adaptation of a system to an ECG signal havingpower line interference of various frequencies. The waveforms generallyillustrate both the frequency identification and frequency adaptationportions of the overall process 800 described in connection with FIGS.10-11, above. In each of the waveforms, various ones of IEC60601-2-51ANE2000/50 Hz and ANE2000/60 Hz ECG data are used.

FIGS. 12a-c illustrate waveforms 1200, 1210, 1220, 1230, 1240. 1250representing frequency identification using an example of the adaptivesystems discussed herein, using a power line frequency of 50 Hz.Waveform 1210 of FIG. 12a shows that the noise is cancelled and the ECGsignal is de-noised, as compared to original signal 1200. Waveform 1220of FIG. 12b shows that the estimated noise {circumflex over (m)}(k)approaching the power line interference, the estimated frequencyparameter ŵ(k) approaches its target value w₅₀. Waveform 1230 of FIG.12b illustrates the parameter update process of ŵ(k) and the signal 614after being processed by the decimation and low-pass filter in therobustness enhancer module 530. It can be seen that at around 0.7 s, thesystem learns that the parameter will be approaching 50 Hz, so it forcesthe parameter to 50 Hz and stops the update (i.e., as in step 844 ofmethod 800). FIG. 12c demonstrates a fast Fourier transform based onobserved data from 4 s onwards; the noise having a peak at 50 Hz infrequency spectrum 1240 (the unfiltered frequencies) is effectivelyremoved, as seen in frequency spectrum 1250 (seen as the spike in S(f)at 50 Hz being removed).

FIGS. 13a-c illustrate waveforms 1300, 1310, 1320, 1330, and frequencycharts 1340, 1350 representing frequency identification using an exampleof the adaptive systems discussed herein, using a power line frequencyof 60 Hz. These waveforms 1300, 1310, 1320, 1330, 1340, 1350 aregenerally analogous to those illustrated in FIGS. 12a-c , but due to thefact that a 60 Hz power signal is used, a spike shown in FIG. 13c is at60 Hz rather than at 50 Hz. In this case, and as seen in FIG. 13b , theparameter update stops at around 1.3 s.

FIG. 14-17 show examples where both frequency identification andfrequency adaptation phases are applied, from method 800. FIGS. 14a-cillustrate waveforms 1400, 1410, 1420, 1430, and 1440 a-d demonstratingthe effectiveness of the frequency identification using an example ofthe adaptive systems discussed herein, by simulating frequencyadaptation to 45 Hz (50−10% Hz). In this example, a frequencyidentification stage occurs within 3 s, but the entire noise is notcanceled since the identified frequency is initially 50 Hz (assigned atabout 1.5 s). In this case, the noise frequency is assigned to 50 Hz ataround 1.5 s. A frequency adaptation stage starts at about 3 s and theparameter approaches its target value of 45 Hz (see waveforms 1420, 1430of FIG. 14b ). As a result, the noise is cancelled (see waveform 1410 ofFIG. 14a , waveforms 1420, 1430 of FIG. 14b ). In FIG. 14c , frequencygraphs 1440 a-d show the FFT based on the data from 4 s onwards, withthe noise effectively eliminated at 45 Hz (i.e., the S(f) peak at 45 Hzis shown as eliminated after about 6-8 seconds, in frequency graph 1440d).

FIGS. 15a-c illustrate waveforms 1500, 1510, 1520, 1530, and frequencycharts 1540 a-d demonstrating the effectiveness of the frequencyidentification and frequency adaptation using an example of the adaptivesystems discussed herein, by simulating frequency adaptation to 52 Hz(50+4% Hz). In this case, frequency is set to 50 Hz in the frequencyidentification stage, and adapted to 52 Hz during the frequencyadaptation phase, settling after about 5 s (see particularly waveform1530 of FIG. 15b , and comparing frequency chart 1540 c-d).

FIGS. 16a-c illustrate waveforms 1600, 1610, 1620, 1630, and frequencycharts 1640 a-d demonstrating the effectiveness of the frequencyidentification and frequency adaptation using an example of the adaptivesystems discussed herein, by simulation frequency adaptation to 58 Hz(60−3.3% Hz). In this case, frequency is set to 60 Hz in the frequencyidentification stage (at about 1.5 s, in waveform 1620 of FIG. 16b ) andafter about 3 s, the frequency adaptation stage adapts to 58 Hz (seen inwaveform 1630 of FIG. 15b and a comparison of frequency charts 1640 c-dof FIG. 16c ).

FIGS. 17a-c illustrate waveforms 1700, 1710, 1720, 1730, and frequencycharts 1740 a-d demonstrating the effectiveness of the frequencyidentification and frequency adaptation using an example of the adaptivesystems discussed herein, by simulation frequency adaptation to 65 Hz(60+8.3% Hz). Again, during frequency identification the frequency isset to 60 Hz within about 3 s of operation, and frequency adaptationcauses adjustment to 65 Hz within about 6-7 s.

FIGS. 18a-c illustrate waveforms 1800, 1810, 1820, 1830, and frequencycharts 1840 a-d demonstrating the effectiveness of the frequencyidentification and frequency adaptation using an example of the adaptivesystems discussed herein, by simulation in which frequency changes from50 Hz to 45 Hz. In this case, frequency adaptation occurs on a 50 Hzsignal at about 3 s, but a power line source frequency changes at about4 s. In this case, it can be seen that the adaptation phase recognizesand adapts to the new 45 Hz frequency (with frequency charts 1840 a-d ofFIG. 18c showing noise at both 50 Hz and 45 Hz frequencies each beingfiltered).

Referring to FIGS. 1-18 overall, it is noted that the methods andapparatus for removing sinusoidal noise with unknown and time-varyingfrequency, can be adapted to a variety of different expectedfrequencies, and can thereby adapt to particular frequencies as needed.In accordance with the apparatus and methods described herein it isnoted that, using the adaptive notch-filtering described herein it ispossible to eliminate sinusoidal noise, in particular, to remove theinterference in ECG measurement due to power line network interferenceeven when the frequency of that interference is unknown and varying overtime. As noted, due to the adaptability of the system, an apparatusconstructed according to the principles discussed herein can adapt todiffering power line frequencies without requiring user knowledge of thepower line frequency or input into the device, and is constructed toautomatically remove the power line interference as the notch filter andassociated ECG machine is being turned on.

Furthermore, although the above illustration provides an exampleimplementation of the frequency identifying and adaptive notch filter ofthe present disclosure, it is noted that many variations may exist whichare consistent with and encompassed by the concepts disclosed herein.For example, in some embodiments, only a portion of the disclosedsystems might be used. In such an example, it may be the case that onlya frequency identification portion is implemented, without attendantadaptation of a filter. In still other embodiments, an alternativerobustness enhancer unit can be employed that applies a different typeor extent of robustness analysis. In further embodiments, a robustnessenhancer unit can be excluded from a system altogether.

In some embodiments, the present disclosure can further be used toeliminate higher order harmonic signals. For example, second and thirdharmonics of a noise signal can be captured, for example by eitherrecalling subroutines relating to harmonic detection, or by expanding aparameter matrix in the observer. In particular, based on the fact thatcos nx=2 cos x·cos(n−1)x−cos(n−2), it yields

$\left\{ {\begin{matrix}{{{\cos\; 2x} = {{2\;\cos^{2}x} - 1}},} \\{{\cos\; 3x} = {{4\;\cos^{3}x} - {3\;\cos\; x}}}\end{matrix}.} \right.$If the parameters representing the unknown frequencies of thefundamental component {circumflex over (f)}_(n), the second harmoniccomponent 2{circumflex over (f)}_(n) and the third harmonic component3{circumflex over (f)}_(n) are denoted as ŵ₁, ŵ₂ and w₃ respectively,then for ŵ₁=2 cos(2π{circumflex over (f)}_(n)/f_(s)), we have

$\left\{ {\begin{matrix}{{\hat{w}}_{2} = {{\hat{w}}_{1}^{2} - 2}} \\{{\hat{w}}_{3} = {{{\hat{w}}_{1}^{3}/2} - {3\;{{\hat{w}}_{1}/2}}}}\end{matrix}.} \right.$

Furthermore, in cases where a notch filtering system is implemented insoftware or firmware of a device, an additional advantage of theapparatus described herein is that the implementation does not requireredesign of other components, but rather can be accomplished usingeither a hardware or software update. In some example implementations,the apparatus can be implemented in software within new and existing ECGproducts (e.g., via a software update). Other advantages to the systemsand methods described herein are apparent as well.

The above specification, examples and data provide a completedescription of the manufacture and use of the composition of theinvention. Since many embodiments of the invention can be made withoutdeparting from the spirit and scope of the invention, the inventionresides in the claims hereinafter appended.

What is claimed is:
 1. A method of adaptively detecting sinusoidal noisefrom an electrical signal, the method comprising: receiving a noisyelectrical signal having a periodic noise component and a filteredelectrical signal component; performing a frequency identificationprocess on the sampled noisy electrical signal to determine an initialfrequency for an estimated periodic noise signal, the frequencyidentification process selecting from among a plurality of discrete,predetermined frequencies; and performing a frequency adaptation processon the sampled noisy electrical signal, the frequency adaptation processresulting in an updated estimated periodic noise signal to be subtractedfrom the sampled noisy electrical signal, thereby forming a filteredelectrical signal.
 2. The method of claim 1, wherein the frequencyidentification process selects the baseline frequency from among aplurality of discrete frequencies based at least in part on a notchfilter converging toward the selected frequency from an initialfrequency.
 3. The method of claim 2, wherein the plurality of discretefrequencies includes a 50 Hz baseline frequency and a 60 Hz baselinefrequency.
 4. The method of claim 2, wherein the initial frequency isabout 55 Hz.
 5. The method of claim 1, wherein the frequency adaptationprocess determines the updated estimated periodic noise signal based ona variance from the baseline frequency.
 6. The method of claim 1,wherein the frequency adaptation process is selectively performed basedon a logical output generated at least in part from a detected stabilityof the filtered electrical signal component.
 7. The method of claim 1,wherein receiving the noisy electrical signal comprises receiving an ECGsignal having power line interference thereon.
 8. The method of claim 1,further comprising, prior to performing the frequency identificationprocess or the frequency adaptation process, initializing a rate ofadaptation.
 9. The method of claim 1, wherein performing the frequencyadaptation process occurs after performing the frequency identificationprocess.
 10. An ECG machine comprising: a controller; one or more ECGsensor inputs communicatively connected to the controller; a powersignal electrically connected to the controller; and a memory configuredto store computer-executable instructions which, when executed using thecontroller, are configured to perform a method comprising: receiving anoisy electrical signal at the controller from the one or more ECGsensor inputs, the noisy electrical signal having a periodic noisecomponent occurring at least in part due to the power signal and afiltered electrical signal component; performing a frequencyidentification process on the sampled noisy electrical signal todetermine an initial frequency for an estimated periodic noise signal,the frequency identification process selecting from among a plurality ofdiscrete, predetermined frequencies; and performing a frequencyadaptation process on the sampled noisy electrical signal, the frequencyadaptation process resulting in an updated estimated periodic noisesignal to be subtracted from the sampled noisy electrical signal,thereby forming a filtered electrical signal.
 11. The ECG machine ofclaim 10, wherein the frequency identification process and the frequencyadaptation process are performed in a notch filter implemented withinthe controller, the notch filter including a state observer unit, aparameter adaptation unit, and a robustness enhancer unit.